#ifndef __BASE_NETWORK_H
#define __BASE_NETWORK_H
#include <string>
#include <vector>
#include <rtc_base/ip_address.h>
namespace xrtc
{

    class Network
    {
    public:
        Network(const std::string &name, const rtc::IPAddress &ip) : name_(name), ip_(ip) {}
        ~Network() = default;
        const std::string &name() { return name_; }
        const rtc::IPAddress &ip() { return ip_; }
        std::string ToString()
        {
            return name_ + ":" + ip_.ToString();
        }

    private:
        std::string name_;
        rtc::IPAddress ip_;
    };

    class NetworkManager
    {
    public:
        NetworkManager();
        ~NetworkManager();
        int CreateNetworks();
        const std::vector<Network *>& GetNetworks() { return network_list_; }

    private:
        std::vector<Network *> network_list_;
    };

} // namespace xrtc

#endif